<!--时间线通用组件
页面引入
  <timeLine :timeData="timeData"></timeLine>
封装格式
timeData: [
        {
          timestamp: "2018/4/12",
          tabtitle: "发布评价",
          name: "魏萌",
          content:
            "通过【App】发布评价，评价分数：50分，评价内容：***************"
        },
        {
          timestamp: "2018/4/12",
          tabtitle: "发布评价",
          name: "魏萌",
          content:
            "通过【App】发布评价，评价分数：50分，评价内容：***************"
        },
        {
          timestamp: "2018/4/12",
          tabtitle: "发布评价",
          name: "魏萌",
          content:
            "通过【App】发布评价，评价分数：50分，评价内容：***************"
        }
]


具体 业务逻辑还待封装
-->

<template>
  <div>
    <div class="block">
      <el-timeline>
        <el-timeline-item
          v-for="(item,index) in timeData"
          :key="index"
          :timestamp="item.timestamp"
          placement="top"
        >
          <div>
            <el-tag>{{item.tabtitle}}</el-tag>
            <p class="block-color">
              <span>发帖人：</span>
              <span>{{item.name}}</span>
            </p>
            <p class="block-color">{{item.content}}</p>
          </div>
        </el-timeline-item>
      </el-timeline>
    </div>
  </div>
</template>

<script>
export default {
  name: "Timeline",
  props: {
    timeData: {
      type: Array,
      default: []
    }
  },
  data() {
    return {};
  },
  methods: {},
  created() {}
};
</script>
<style>
.el-timeline-item__timestamp.is-top {
  position: absolute;
  left: -65px;
}
.el-timeline {
  margin-left: 60px;
}
</style>
<style lang="scss" scoped>
.block-color {
  font-size: 13px;
  color: #909399;
}
</style>
